#pragma once
#include "HBaseModel.h"
#include "ICircuitDisObj.h"
#include "System.h"
#include "Device.h"
#include "DeviceDisplayObj.h"


#define DEFAULT_LAYER_ID 1

class HCircuitModel :public HBaseModel
{
public:
	HCircuitModel(char const * model = 0);
	~HCircuitModel(void);
public:
	virtual void Serialize(CArchive& ar);
	void BuildBigDrawingVirtualEnvironment();
	void RenderCircuit( CICircuitDisObj* pCircuitDisObj );
	void EndBigDrawingVirtualEnvironment();
	CSystem *GetCurVirtualSystem();
	CDevice *GetCurVirtualDevice();
	CICircuitDisObj*GetCurCirCuitDisObj();

	CICircuit *GetCurCirCuit();
	void Clear();

	CHoopsMap * GetHoopMap() const { return m_pHoopMap; }
protected:
	CHoopsMap *m_pHoopMap;
	CSystem  *m_pSystem;
	CDevice *m_pDevice;
	CDeviceDisplayObj *m_pDevDis;
	CICircuitDisObj  *m_pCirCuitDis;
};

